home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 4
/
United Public Domain Gold 4.iso
/
fredfish
/
ff.0316.dms
/
ff.0316.adf
/
SmartIcon
/
src
/
romtraps.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-02-06
|
974b
|
51 lines
#include <exec/types.h>
#include <intuition/intuition.h>
#include <intuition/intuisup.h>
#include "patch.h"
extern struct Window *theEventWindow;
extern ULONG PatchSignal;
extern struct Task *PatchTask;
VOID
MyOpenWindow(window)
register struct Window *window;
{
PatchWindow(window);
}
VOID
MyCloseWindow(window)
register struct Window *window;
{
register struct WindowPatch *p;
Forbid();
if (p = (struct WindowPatch *)FindWPatch(window))
UnPatchWindow(p, FALSE);
Permit();
}
BYTE
MyPutMsg(port, msg)
register struct MsgPort *port;
register struct IntuiMessage *msg;
{
if (msg->Class==GADGETUP || msg->Class==GADGETDOWN)
{
register USHORT id = ((struct Gadget *)(msg->IAddress))->GadgetID;
if (id==ICONGADGET)
{
theEventWindow = msg->IDCMPWindow;
Signal(PatchTask, 1 << PatchSignal);
ReplyMsg(msg);
return(1);
}
}
return(0);
}